-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Huge refactor of code #201
base: main
Are you sure you want to change the base?
Conversation
latest version includes the logging I added of the audio duration and how much audio the VAD removes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, lots of improvements that makes the code more readable, clear, maintainable!
Of course, since it's a big PR, I still have quite some suggestions for improvement. Let me know if anything is unclear, or if you want to discuss anything!
task.status = Status.DONE | ||
task.response = outputs | ||
logger.info(f"Successfully transcribed task {task.id}") | ||
except Exception as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to catch specific errors you know may occur, although it does make sense to catch a general 'Exception' at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. My reasoning was that, this way, I catch any type of exception that could be thrown and I don't think the type matters too much since the exception itself will also be logged.
NB I merely looked at the code. Do you also have a test plan in mind? |
I have no test plan at the moment for this PR. Only tested locally using Docker and it was working as expected. If you also mean to create a suite of unit tests, I unfortunately won't have time for that this week and I won't be able to work on this further starting next week. |
Similar refactor that was done to audio-extraction (see: beeldengeluid/audio-extraction-worker#28 and beeldengeluid/audio-extraction-worker#28 (comment)), mainly impacting exception raising and logging (no transcripts/provenance outputted as INFO, but as DEBUG now). Additionally, running the worker as a job was removed because it is tested and deployed as a service first and foremost.
Closes #124